package com.aspose.cells;

import java.util.ArrayList;

class zauo {
   boolean a;
   boolean b;
   private ArrayList c;
   private ArrayList d = new ArrayList();
   private ArrayList e;
   private ArrayList f;
   private ArrayList g;
   private int h;
   private ArrayList i = null;

   zauo(boolean var1, boolean var2) {
      this.a = var1;
      this.b = var2;
      if (!var1) {
         this.c = new ArrayList();
      }

   }

   void a(Object var1, int var2) {
      ++this.h;
      if (var1 == null) {
         if (this.a) {
            if (this.g == null) {
               this.g = new ArrayList();
            }

            com.aspose.cells.b.a.a.ze.a(this.g, (Object)var2);
            return;
         }

         var1 = 0.0D;
      }

      switch(zamo.a(var1.getClass())) {
      case 3:
         this.a((Object)((Boolean)var1), var2);
         break;
      case 9:
         this.a((Object)((Integer)var1), var2);
         break;
      case 14:
         this.a((Object)((Double)var1), var2);
         break;
      case 16:
         DateTime var3 = (DateTime)var1;
         this.a(CellsHelper.getDoubleFromDateTime(var3, false), var2);
         break;
      case 18:
         this.a((String)var1, var2);
      }

   }

   private void a(double var1, int var3) {
      zeh var4 = new zeh();
      var4.a = var1;
      var4.b = var3;
      boolean var5 = false;

      for(int var6 = 0; var6 < this.d.size(); ++var6) {
         zeh var7 = (zeh)this.d.get(var6);
         if (var1 < var7.a) {
            this.d.add(var6, var4);
            var5 = true;
            break;
         }
      }

      if (!var5) {
         com.aspose.cells.b.a.a.ze.a(this.d, (Object)var4);
      }

   }

   private void a(String var1, int var2) {
      if (this.c == null) {
         this.c = new ArrayList();
      }

      zei var3 = new zei();
      var3.a = var1;
      var3.b = var2;
      boolean var4 = false;

      for(int var5 = 0; var5 < this.c.size(); ++var5) {
         zei var6 = (zei)this.c.get(var5);
         if (com.aspose.cells.b.a.zv.c(var1, var6.a) == -1) {
            this.c.add(var5, var3);
            var4 = true;
            break;
         }
      }

      if (!var4) {
         com.aspose.cells.b.a.a.ze.a(this.c, (Object)var3);
      }

   }

   int[] a() {
      int[] var1 = new int[this.h];
      int var2 = 0;
      int var3;
      zeh var4;
      zei var5;
      zeg var6;
      if (this.b) {
         if (this.d != null) {
            for(var3 = 0; var3 < this.d.size(); ++var3) {
               var4 = (zeh)this.d.get(var3);
               var1[var2++] = var4.b;
            }
         }

         if (this.c != null) {
            for(var3 = 0; var3 < this.c.size(); ++var3) {
               var5 = (zei)this.c.get(var3);
               var1[var2++] = var5.b;
            }
         }

         if (this.f != null) {
            for(var3 = 0; var3 < this.f.size(); ++var3) {
               var1[var2++] = (Integer)this.f.get(var3);
            }
         }

         if (this.e != null) {
            for(var3 = 0; var3 < this.e.size(); ++var3) {
               var1[var2++] = (Integer)this.e.get(var3);
            }
         }

         if (this.i != null) {
            for(var3 = 0; var3 < this.i.size(); ++var3) {
               var6 = (zeg)this.i.get(var3);
               var1[var2++] = var6.a;
            }
         }

         if (this.g != null) {
            for(var3 = 0; var3 < this.g.size(); ++var3) {
               var1[var2++] = (Integer)this.g.get(var3);
            }
         }
      } else {
         if (this.g != null) {
            for(var3 = 0; var3 < this.g.size(); ++var3) {
               var1[var2++] = (Integer)this.g.get(var3);
            }
         }

         if (this.i != null) {
            for(var3 = this.i.size() - 1; var3 >= 0; --var3) {
               var6 = (zeg)this.i.get(var3);
               var1[var2++] = var6.a;
            }
         }

         if (this.e != null) {
            for(var3 = 0; var3 < this.e.size(); ++var3) {
               var1[var2++] = (Integer)this.e.get(var3);
            }
         }

         if (this.f != null) {
            for(var3 = 0; var3 < this.f.size(); ++var3) {
               var1[var2++] = (Integer)this.f.get(var3);
            }
         }

         if (this.c != null) {
            for(var3 = this.c.size() - 1; var3 >= 0; --var3) {
               var5 = (zei)this.c.get(var3);
               var1[var2++] = var5.b;
            }
         }

         if (this.d != null) {
            for(var3 = this.d.size() - 1; var3 >= 0; --var3) {
               var4 = (zeh)this.d.get(var3);
               var1[var2++] = var4.b;
            }
         }
      }

      return var1;
   }
}
